package com.base.service.Impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.base.domain.moudles.entity.User;
import com.base.mapper.UserMapper;
import com.base.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author zhou minghao
 * @date 2024/4/22
 * @description
 */
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public User getUserById(User user) {
        //查询条件构造器
        QueryWrapper<User> wrapper = new QueryWrapper<>();
        wrapper.eq("id",user.getId());
        User resUser = userMapper.selectOne(wrapper);
        return resUser;
    }
}
